-- GENERATED SPELL FOR [Conjured Water Elemental] --


function spell0_21160(pUnit, Event) --@Geyser,n/a--
pUnit:FullCastSpellOnTarget(37427,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_21160', 0, 1)
end

function spell1_21160(pUnit, Event) --@Water Shield,n/a--
pUnit:FullCastSpellOnTarget(37432,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_21160', 5000, 1)
end

function Sorts_21160(pUnit, Event)
local choix_sorts_21160 = math.random(0, 1)
if choix_sorts_21160 == 0 then
pUnit:RegisterEvent('spell0_21160', 1, 1)
end
if choix_sorts_21160 == 1 then
pUnit:RegisterEvent('spell1_21160', 1, 1)
end
end

function mob21160_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_21160', math.random(1500, 3000), 1)
end

function mob21160_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21160_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21160_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(21160, 1, 'mob21160_Action')
RegisterUnitEvent(21160, 2, 'mob21160_Leave')
RegisterUnitEvent(21160, 3, 'mob21160_Kill')
RegisterUnitEvent(21160, 4, 'mob21160_Die')
